home *** CD-ROM | disk | FTP | other *** search
- Path: dd.chalmers.se!news.chalmers.se!sunic!pipex!howland.reston.ans.net!news.intercon.com!uhog.mit.edu!news.mtholyoke.edu!nic.umass.edu!ymir.cs.umass.edu!barrett
- From: barrett@cs.umass.edu (Daniel Barrett)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: HELP!!! Arexx compiler or C?
- Date: 14 Dec 1993 00:15:02 GMT
- Organization: BLAZEMONGER INCORPORATED
- Lines: 56
- Distribution: world
- Message-ID: <2ej0i6INN68h@ymir.cs.umass.edu>
- References: <931209.82988.HALLEEN@delphi.com> <12DEC199301543405@loyola.edu>
- NNTP-Posting-Host: astro.cs.umass.edu
-
- In article <12DEC199301543405@loyola.edu> mglicksman@loyola.edu (Michael `SLAM' Glicksman) writes:
- >I was wondering, does anyone do any serious programming in arexx? I'm a
- >Computer Science major...
-
- I would never use ARexx for a large project because the variable
- scoping is too weird. All your variables are scoped to the bottom of the
- file, right into your subprograms, unless you use the "PROCEDURE" keyword to
- protect your subprograms. But PROCEDURE/EXPOSE looks at the *dynamic* chain,
- not the static chain, to determine a variable's scope. For example, suppose
- you want to protect function Funky, but let it access global variable G. So
- you write:
-
- Funky: PROCECDURE EXPOSE G
- ...stuff...
- return G + 17
-
- Looks fine, right? Now suppose that function Another calls function Funky.
-
- Another: PROCEDURE
- return Funky
-
- Notice that function Another does not refer to the variable "G" at all.
- Well, tough luck! You have to EXPOSE G anyway, because Funky needs it.
-
- Discovering this made me want to tear my hair out.
-
- Another lovely feature is the conflict between variable names
- and record field names. If you have a record R with a field F, and you
- *also* have a variable named F, have fun!
-
- Yet another feature is that you can't partition your program into
- multiple files without incurring a performance hit. Functions in other files
- get loaded from disk while running. Darn.
-
- >Oh, and there's been something that's been bugging the h*ll outta me for the
- >past few months: Is it possible to pass a group of compound variables to a
- >procedure?
- > test.a = 1; test.b = 2; test.c = 3
- > CALL printout(test)
-
- I believe you have to write:
-
- CALL printout(test.) /* Notice the period */
-
- Another difficulty of ARexx.
-
- I like ARexx as a scripting language and for its inter-program
- communication abilities. It's mighty powerful for string handling.
- But for a large program? No thanks.
-
- Dan
-
- //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- | Dan Barrett -- Dept of Computer Science, Lederle Graduate Research Center |
- | University of Massachusetts, Amherst, MA 01003 -- barrett@cs.umass.edu |
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////
-